package org.fatewa.engine.property;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;

/**
 * 关于 Rayquaza 的一些配置项
 *
 * @author 4everlynn
 */
@Data
@ConfigurationProperties(prefix = "rayquaza.response")
@EnableConfigurationProperties({ResponseCodeMapper.class, ResponseMessageMapper.class})
public class RayquazaResponseProperties {
    /**
     * 接口根路径
     */
    private String root;

    /**
     * 映射 Response 的请求码
     */
    private ResponseCodeMapper codeMapper;

    /**
     * 映射 Response 的消息
     */
    private ResponseMessageMapper messageMapper;

    /**
     * 接口版本
     * 如 v1, 接口路径拼接时会使用 /{root}/{version} 的形式进行拼接
     */
    private String version;
    /**
     * Response的默认放置位置(key)
     */
    private String dataKey = "data";
}
